﻿<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <mappings>
    <mapping type="Neits.PersistenceService.PersistenceServiceConfiguration, Neits.PersistenceService" xpath="/configuration/PersistenceServiceConfiguration"/>
    <mapping type="Neits.PersistenceService.Providers.HibernateConfiguration, Neits.PersistenceService" xpath="/configuration/HibernateConfiguration"/>
    <mapping type="Projecturo.ProjecturoClient.ViewModel.ViewModelManagerConfiguration, Projecturo.ProjecturoClient" xpath="/configuration/ViewModelManagerConfiguration"/>
  </mappings>

  <PersistenceServiceConfiguration>
    <Providers>
      <string>Neits.PersistenceService.Providers.HibernateProvider, Neits.PersistenceService</string>
    </Providers>
  </PersistenceServiceConfiguration>

  <ViewModelManagerConfiguration>
    <ViewModels>
      <ViewModelConfigurationItem modelType="Projecturo.Model.Project, Projecturo.Model" viewModelType="Projecturo.ProjecturoClient.ViewModel.Project.ProjectViewModel"/>
      <ViewModelConfigurationItem modelType="Projecturo.Model.LoginInformation, Projecturo.Model" viewModelType="Projecturo.ProjecturoClient.ViewModel.Login.LoginViewModel"/>
      <ViewModelConfigurationItem modelType="Projecturo.Model.Ticket, Projecturo.Model" viewModelType="Projecturo.ProjecturoClient.ViewModel.Project.TicketViewModel"/>
      <ViewModelConfigurationItem modelType="Projecturo.Model.Category, Projecturo.Model" viewModelType="Projecturo.ProjecturoClient.ViewModel.Project.CategoryViewModel"/>
      <ViewModelConfigurationItem modelType="Projecturo.Model.Version, Projecturo.Model" viewModelType="Projecturo.ProjecturoClient.ViewModel.Project.VersionViewModel"/>
      <ViewModelConfigurationItem modelType="Projecturo.Model.UserProfil, Projecturo.Model" viewModelType="Projecturo.ProjecturoClient.ViewModel.UserManagement.UserProfileViewModel"/>
      <ViewModelConfigurationItem modelType="Projecturo.Model.User, Projecturo.Model" viewModelType="Projecturo.ProjecturoClient.ViewModel.UserManagement.UserViewModel"/>
      <ViewModelConfigurationItem modelType="Projecturo.Model.UserManagement, Projecturo.Model" viewModelType="Projecturo.ProjecturoClient.ViewModel.UserManagement.UserManagementViewModel"/>
      <ViewModelConfigurationItem modelType="Projecturo.Model.Note, Projecturo.Model" viewModelType="Projecturo.ProjecturoClient.ViewModel.Project.NoteViewModel"/>
      <ViewModelConfigurationItem modelType="Projecturo.Model.TimeRecord, Projecturo.Model" viewModelType="Projecturo.ProjecturoClient.ViewModel.Project.TimeRecordViewModel"/>
      <ViewModelConfigurationItem name="TimeRecordList" viewModelType="Projecturo.ProjecturoClient.ViewModel.Project.TimeRecordListViewModel"/>
      <ViewModelConfigurationItem modelType="Projecturo.Model.Milestone, Projecturo.Model" viewModelType="Projecturo.ProjecturoClient.ViewModel.Project.MilestoneViewModel"/>
      <ViewModelConfigurationItem name="ProjectAdministration" viewModelType="Projecturo.ProjecturoClient.ViewModel.Project.ProjectManagementViewModel"/>
      <ViewModelConfigurationItem modelType="Projecturo.Model.TicketState, Projecturo.Model" viewModelType="Projecturo.ProjecturoClient.ViewModel.Project.TicketStateViewModel"/>
    </ViewModels>
  </ViewModelManagerConfiguration>
  
  <HibernateConfiguration>
    <HibernateSettings>
      <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
        <session-factory>
          <!-- MICROSOFT ACCESS Configuration -->
          <!--<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
          <property name="connection.driver_class">NHibernate.JetDriver.JetDriver, NHibernate.JetDriver</property>
          <property name="connection.connection_string">Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\ned\Documents\Projecturo.accdb</property>
          <property name="show_sql">false</property>
          <property name="dialect">NHibernate.JetDriver.JetDialect, NHibernate.JetDriver</property>
          <property name="use_outer_join">true</property>
          <mapping resource="Projecturo.Model.Projecturo.Model.hbm.xml" assembly="Projecturo.Model" />-->
          <!-- SQL SERVER Configuration -->
          <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
          <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
          <property name="connection.connection_string">Server=(local)\SQL2008ADV;initial catalog=projecturo_dev;Integrated Security=SSPI;</property>
          <property name="show_sql">false</property>
          <property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
          <property name="use_outer_join">true</property>
          <mapping resource="Projecturo.Model.Projecturo.Model.hbm.xml" assembly="Projecturo.Model" />
        </session-factory>
      </hibernate-configuration>
    </HibernateSettings>
  </HibernateConfiguration>
  
</configuration>